package com.ling.pl.core.service;

import com.ling.pl.core.commons.IEntityCommandBase;
import com.ling.pl.core.commons.support.DaoPage;
import com.ling.pl.core.dao.IDao;
import org.hibernate.criterion.DetachedCriteria;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;


public interface IService<T> extends IEntityCommandBase {

    public IDao getDao();

    /**
     * @param datasetMap
     */
    void batchExecute(Map datasetMap);

    DaoPage pageBy(final DetachedCriteria detachedCriteria,
                   final int pageIndex, final int pageSize);

    List findBy(final DetachedCriteria criteria);

    List findBy(StringBuffer hql, Map params, Integer pageIndex, Integer pageSize);

    List findBy(StringBuffer hql, Map params);

    Long countBy(StringBuffer hql, Map params);

    public Object get(Class clazz, Serializable id);

    public Date getDatabaseServerDate();


}
